import { takeEvery, put, delay } from 'redux-saga/effects';
import { increment } from '../actions/conter.actions.js';
import { INCREMENT_ASYNC } from '../count/counter.const';

// takeEvery 接收 action
// put 触发 action

function* increment_async_fn(action) {
    console.log(222222222222)

    yield delay(1);
    yield put(increment(20))
}

export default function* counterSaga() {
    console.log(1231312)
    // 接收action
    yield takeEvery("increment_async", increment_async_fn)
}